﻿<?php echo $this->render('inc/header.htm') ?>
	<link rel="stylesheet" type="text/css" href="css/start/jquery-ui-1.9.1.custom.min.css" />
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
			<!-- left column/section -->
			<?php echo $this->render('inc/_left_nav.htm') ?>
			<!-- End of left column/section -->
			
			<!-- right column/section -->
			<section class="column width6 right_content">
				<div class="add-group">
					<span class="label label-gray"><a href="info/info-list">信息列表</a></span>
					<span class="label label-gray"><?php if(isset($_GET['iid']) && !empty($_GET['iid'])) { ?>编辑<?php }else { ?>添加<?php } ?>信息</span>
					<hr />
					<div class="box box-info">请编辑信息内容</div>
					<form action="" method="post" id="sampleform">
						<fieldset>
							<legend>编辑信息内容</legend>
							<p>
								<label for="info_title" class="required">信息名称:</label><br>
								<input type="text" name="info_title" value="<?php echo $this->data[0]['info_title'] ?>" class="half" id="info_title" />
							</p>
							
							<p>
								<label for="info_order" class="required">排序:</label><br>
								<input type="text" name="info_order" value="<?php echo $this->data[0]['info_order']?$this->data[0]['info_order']:'0' ?>" class="half" id="info_order" />
							</p>
							
							<p>
								<label for="wd_tag_desc">简介:</label><br>
								<textarea name="info_content" class="large full" id="info_content"><?php echo $this->data[0]['info_content'] ?></textarea>
							</p>
						</fieldset>
						<p class="box"><input type="submit" value="确定" class="btn btn-green big"> or <input type="reset" value="重置" class="btn"></p>
					</form>
				</div>
			</section>
			<!-- End of right column/section -->
		</div>
		<!-- End of Wrapper -->
	</div>
	<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script>

	<script>
		var editor1;
		KindEditor.ready(function(K) {
				editor1 = K.create('textarea[name="info_content"]', {
				cssPath : 'kindeditor/plugins/code/prettify.css',
				uploadJson : 'kindeditor/php/upload_json.php',
				fileManagerJson : 'kindeditor/php/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=wen]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=wen]')[0].submit();
					});
				}
			});
		
			prettyPrint();
		});
		
		function validate(){
			editor1.sync(); 
			document.forms['wen'].submit(); 
		}
	</script>
	<!-- End of Page content -->
<?php echo $this->render('inc/footer.htm') ?>